# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Andri Yngvason <andri@yngvason.is>

pkgname=neatvnc
pkgver=0.6.0
pkgrel=2
pkgdesc='Fast and neat VNC server library'
arch=(loong64 x86_64)
url=https://github.com/any1/neatvnc
license=(custom:ISC)
depends=(
  glibc
  gnutls
  libaml.so
  libavcodec.so
  libdrm
  libpixman-1.so
  libturbojpeg.so
  mesa
  zlib
)
makedepends=(
  git
  meson
  ninja
)
provides=(libneatvnc.so)
_tag=8b3dc1ae6099dcfa73aec3ae11df2fdc58540d14
source=(git+https://github.com/any1/neatvnc.git#tag=${_tag})
b2sums=(SKIP)

pkgver() {
  cd neatvnc
  git describe --tags | sed 's/^v//'
}

build() {
  arch-meson neatvnc build \
    -Djpeg=enabled \
    -Dtls=enabled
  meson compile -C build
}

package() {
  DESTDIR="${pkgdir}" meson install -C build
  install -Dm 644 neatvnc/COPYING -t "${pkgdir}"/usr/share/licenses/neatvnc
}

# vim: ts=2 sw=2 et:
